package com.runshu.newsmartark.mvp.model;


import com.runshu.newsmartark.common.ConstantUrl;
import com.runshu.newsmartark.entity.LogsManagerBean;
import com.runshu.newsmartark.mvp.contract.LogsManagerContract;
import com.runshu.newsmartark.network.netbean.HttpRequestParamsBuilder;
import com.runshu.newsmartark.network.netbean.ResponseBean;
import com.runshu.newsmartark.network.netinterface.BaseCallBack;

/**
 * Demo class
 *
 * @author yu
 * @date 2020/8/10
 * @decs：
 */

public class LogsManagerModel extends BaseModel implements LogsManagerContract.Model {

    @Override
    public void getLogsManagerList(String mac, String operationName, String operationType, String dateType, String startDate, String endDate, int pageSize, int pageNum, BaseCallBack baseCallBack) {
        HttpRequestParamsBuilder builder = new HttpRequestParamsBuilder();
        builder.putParams("macAddress",mac);
        builder.putParams("operationName",operationName);
        builder.putParams("operationType",operationType);
        builder.putParams("dateType",dateType);
        builder.putParams("startDate",startDate);
        builder.putParams("endDate",endDate);
        builder.putParams("pageSize",pageSize);
        builder.putParams("pageNum",pageNum);
        super.initDataFromServer(ConstantUrl.GET_LOGS_LIST,builder.build(), LogsManagerBean.class, ResponseBean.RES_DATATYPE_BEAN,baseCallBack);

    }
}